TARGET = tanks
LIBS = `sdl-config --libs` -L./libs/ -lHTMLog
CFLAGS = -O3 `sdl-config --cflags` -I./libs/log/
CC = g++

all:
	$(CC) $(CFLAGS) -c common.cpp -o common.o
	$(CC) $(CFLAGS) -c main.cpp -o main.o
	$(CC) $(CFLAGS) -c xgame.cpp -o xgame.o
	$(CC) $(CFLAGS) -c xlevel.cpp -o xlevel.o
	$(CC) $(CFLAGS) -c xobject.cpp -o xobject.o
	$(CC) $(CFLAGS) -c xobjlist.cpp -o xobjlist.o
	$(CC) $(CFLAGS) -c xtank.cpp -o xtank.o
	$(CC) $(CFLAGS) -c xplayer.cpp -o xplayer.o
	$(CC) -o $(TARGET) main.o common.o xgame.o xlevel.o xobject.o xobjlist.o xtank.o xplayer.o $(LIBS)
	strip $(TARGET)
clean:
	rm *.o 
	rm *~
	rm $(TARGET)
